import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function list(query) {
  return request({
    url: '/system/salesmanRoyalties/list',
    method: 'get',
    params: query
  })
}

export function getSalesmanRoyaltiesInfo(query) {
  return request({
    url: '/system/salesmanRoyalties/getInfo',
    method: 'get',
    params: query
  })
}

export function getEmpList(query) {
  return request({
    url: '/system/salesmanRoyalties/getEmpList',
    method: 'get',
    params: query
  })
}

export function changeRoyalties(query) {
  return request({
    url: '/system/salesmanRoyalties/changeRoyalties',
    method: 'get',
    params: query
  })
}


export function updateSalesmanRoyalties(data) {
  return request({
    url: '/system/salesmanRoyalties/updateSalesmanRoyalties',
    method: 'put',
    data: data
  })
}

export function synchronizationSalary(id, empId, royalties) {
  return request({
    url: '/system/salesmanRoyalties/synchronizationSalary/' + id + '/' + empId + '/' + royalties,
    method: 'put'
  })
}
